# Copyright 2007 pyPayPal Dev Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class Error(Exception):
    """ Parent class for all errors used in the code """
    def __init__(self, message):
        self.message = message
    def __str__(self):
        return repr(self.message)
    
class IncompleteObjectError(Error):
    """ Exception Class for handling objects which are incomplete """
    
class MissingObjectError(Error):
    """ For when people forget to set and/or create appropriate objects """

class InvalidParamaterError(Error):
    """ For those times when parameters that are passed into a function are not what they should be """
    
class ValueOutOfBoundsError(Error):
    """ For those pesky values that fall out of bounds """
    
class Warning(Exception):
    """ Parent Class for all warnings """
    def __init__(self, message):
        self.message = message
    def __str__(self):
        return repr(self.message)
    
class ResponseWarning(Warning):
    """ Temp warning class for response """
    
    
#class AddressOnlyName(IncompleteObjectError):
#    """ An error handler for address issues. """
#class CardError(Error):
#    """ An error handler for credit card issues. """
#class ItemError(Error):
#    """ An error handler for item issues. """        
#class SubtotalError(Error):
#    """ An error handler for item issues. """
#class ResponseError(Error):
#    """ A class for handling all types of NVP response Errors 
#    If this is thrown, then the transaction failed. 
#    The warnings are attatched."""        
#class ResponseWarning(Error):
#    """ A class for handling all types of NVP response Warnings 
#    If this is thrown, then the transaction was a success, but there were
#    warnings returned by PayPal"""
